﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Text;

public partial class Admin_Article_1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ContentType = "text/html";
        if (HttpContext.Current.Request["channelId"] != "")
        {
            string strs = Channel_Class_Menu(HttpContext.Current.Request["channelId"]);
           Response.Write(strs);
        }
    } 
    #region   频道的文章类别
    public string Channel_Class_Menu(string channelId)
    {
        StringBuilder tempStr = new StringBuilder();
        tempStr.Append("→顶级类别|0");
        DataSet ds = DbHelperSQL.Query("select * from T_ArticleCategory where ChannelId='" + channelId + "'");
        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
            {
                string tempText = "";
                string spaceStr = "";
                tempText = spaceStr + "┝" + ds.Tables[0].Rows[i]["CatName"].ToString();
                tempStr.Append("," + tempText + "|" + ds.Tables[0].Rows[i]["OrderId"].ToString());
            }
        }
        return tempStr.ToString();
    }
    #endregion
}
